<!-- 详情 -->
<template>
    <div class="drawer-layout">
        <el-drawer :title="detailTitle" :visible.sync="drawer" @closed="closedinvitation" size="60%"
            :wrapperClosable="false">
            <div class="layout" style="position: relative" v-loading="loading">
                <div class="timebox">
                    <el-timeline>
                        <el-timeline-item placement="top" v-for="(item,index) in timeline" :key="index">
                            <div class="flex-between marginBottom10">
                                <div>受理时间：{{ item.time }}</div>
                                <div>受理状态：
                                    <span v-if="item.status=='驳回'" style="color:#F56C6C;font-weight: 600;">{{ item.status }}</span>
                                    <span v-else style="color:#67C23A;font-weight: 600;">{{ item.status }}</span>
                                </div>
                            </div>
                            <div class="marginBottom10">
                                <div class="marginBottom10">申请原因：</div>
                                <div style="margin-left: 20px;">{{ item.season }}</div>
                            </div>
                            <div class="seasonbox">
                                <div class="marginBottom10">受理人：{{ item.person }}</div>
                                <div class="marginBottom10" v-if="item.status=='驳回'">驳回理由：</div>
                                <div class="marginBottom10" v-else>通过理由：</div>
                                <div>{{ item.season }}</div>
                            </div>

                        </el-timeline-item>
                    </el-timeline>
                </div>
            </div>
        </el-drawer>
    </div>
</template>
<script>
// 引入
import LogoUpload from "@/components/FileUpload";
export default {
    name: "detail",
    props: [
        "status",
        "regionList",
        "groupingList",
        "TagCategoryAll",
        "gradeList",
    ],
    components: {
        LogoUpload,
    },
    data() {
        return {
            loading: false,
            id: "",
            drawer: true,
            detailTitle: "售后历史",
            timeline: [
            {
                time: '2024-01-13 12:13:13',
                status: '驳回',
                season: '因为质量问题需要平台售后',
                person: 'xxx'
            },
            {
                time: '2024-01-13 12:13:13',
                status: '通过',
                season: '因为质量问题需要平台售后',
                person: 'xxx'
            }
            ]
        }
    },
    mounted() { },
    methods: {
        // 关闭添加抽屉
        closedinvitation() {
            this.$parent.closedetail();
        },
        handleClick(tab, event) {
            console.log(tab, event);
        },
        showtel() {
            this.ifshowtel = !this.ifshowtel;
            if (this.ifshowtel == true) {
                this.tel = '18888888888'
            } else {
                this.tel = '188********'
            }
        },
        check(type) {
            if (type == 1) {
                this.$prompt('请填写驳回原因', '审核驳回', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                }).then(({ value }) => {
                    this.$message({
                        type: 'success',
                        message: '驳回原因: ' + value
                    });
                }).catch(() => {
                });
            } else {
                this.$prompt('请填写通过原因', '审核通过', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                }).then(({ value }) => {
                    this.$message({
                        type: 'success',
                        message: '通过原因: ' + value
                    });
                }).catch(() => {
                });
            }

        }
    }
};
</script>
<style lang="scss">
.drawer-layout {

    /*1.显示滚动条：当内容超出容器的时候，可以拖动：*/
    .el-drawer__body {
        overflow: auto;
    }

    /*2.隐藏滚动条，太丑了*/
    .el-drawer__container ::-webkit-scrollbar {
        display: none;
    }

    .el-drawer__header {
        background-color: #409eff;
        color: #ffffff;
        padding: 10px 20px;
        margin-bottom: 10px;
    }

    .el-tabs--card {
        height: calc(100vh - 110px);
        /* overflow-y: auto; */
    }

    .el-tab-pane {
        height: calc(100vh - 110px);
        overflow-y: auto;
    }

    .el-tabs__header {
        padding-left: 50px;
        margin: 0;
    }

    .el-tabs__item {
        padding: 0 40px;
    }

    .el-tabs__nav-wrap::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 2px;
        background-color: #ffffff;
        z-index: 1;
    }

    .el-alert--warning.is-light .el-alert__description {
        color: #c77b04;
        font-size: 14px;
    }

    .form-box-item {
        .el-form-item__label {
            font-size: 14px;
            font-weight: 500;
            // width: 96px;
        }

        .el-input {
            width: 250px;
        }
    }
}
</style>
<style lang="scss" scoped>
.margin20 {
    margin: 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
}

.flex {
    display: flex;
}

.marginLeft40 {
    margin-left: 40px;
}

.font14 {
    font-size: 14px;
}
.marginBottom10{
    margin-bottom: 10px;
}
.blockquote-box {
    border-left: 4px solid #409eff;
    padding: 0 16px;
    margin: 16px 0;
    height: 40px;
    line-height: 40px;
    background: #fafafa;
    font-size: 14px;
}

.timebox {
    margin: 20px 20px 20px 0;
    .seasonbox{
        margin-top: 10px;
        border-radius: 3px;
        padding:10px;
        background-color: #efefef;
    }
}

</style>